menubutton: Fix possible button/popover state inconsistences
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 20 Feb 2015 12:33:09 +0000 (13:33 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Fri, 20 Feb 2015 13:44:17 +0000 (14:44 +0100)
commitfa48b42ef1b1e43b1728d0fea51f68e760dd37b0
tree6bd3dac23248a3f16d0e27769312a0b38c75e5a1
parent85ad434290bc92ecdd92eb86b997bf103b658f1d
menubutton: Fix possible button/popover state inconsistences

While a popover is hiding, the modal grab is already gone and the toggle
button is clickable again, but clicking again at that time will result in
gtk_widget_show() trying to show an already shown widget (although fading
out and hidden soon) and the toggle button activated.

So let the menubutton set the active status only if the menu/popover
widget wasn't already shown, and ensure this doesn't get triggered by
double/triple button press events.
gtk/gtkmenubutton.c